package com.example.designpatterns.model.observer.eventbus;

import com.example.designpatterns.model.observer.demo.NotificationService;
import org.springframework.stereotype.Service;

/**
 * @author yanyun zhu
 * @version 1.0
 * @date 2022/1/4 15:09
 */
@Service
public class RegNotificationObserver {

    private NotificationService notificationService;

    @Subscribe
    public void handleRegSuccess(Long userId) {
        System.out.println("RegNotificationObserver========");
        notificationService.sendInboxMessage(userId);
    }

}
